#ifndef AGENT_H
#define AGENT_H
#include "traffic_sim.h"
#include <QGraphicsItem>
#include <QObject>
class GraphWidget;
using namespace Traffic_Sim;
class Edge;
class GraphWidget;
class Node;

class Agent : public QObject, public QGraphicsItem
{
  Q_OBJECT

    public:

unsigned flag;
Agent();
Agent(GraphWidget *graphWidget, Traffic_Sim::Traffic_Vehicle * vehicle);
Agent(Node * node);
  

void setAgent(Traffic_Agent_Impl* vehicle);
void setGraphWidget(GraphWidget * graphwidget);

  
  QRectF boundingRect() const;


  void paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
	     QWidget *widget);
  
 protected:
 
 private:
  float x;
  float y;	
  public:
  Node *node;
  GraphWidget * graphwidget;
  Traffic_Vehicle * vehicle;
};

#endif
